package QC.MessageBox.beans;

import QC.MessageBox.annotation.APPTable;

/**
 * Created by Andaren on 2017/5/12.
 * Used for: 用户行为记录
 *          谁，在什么时候，做了什么事
 */
@APPTable(table = "t_user_action")
public class UserAction {

    @APPTable(column = "id", isId = true)
    private Long id;

    @APPTable(column = "openid")
    private String openId;

    /**
     * 说明：有的动作有开始和结束时间，如：用户关注公众号，结束时间为用户取消关注的时间
     *       有的没有结束时间，如：用户点击自定义菜单，没有结束时间
     */
    @APPTable(column = "start_time")
    private Long actStartTime;    // 用户动作开始时间
    @APPTable(column = "end_time")
    private Long actEndTime;      // 用户动作结束时间

    @APPTable(column = "act_type")
    private String actType;

    @APPTable(column = "description")
    private String description;

    public Long getId() {
        return id;
    }

    public UserAction setId(Long id) {
        this.id = id;
        return this;
    }

    public String getOpenId() {
        return openId;
    }

    public UserAction setOpenId(String openId) {
        this.openId = openId;
        return this;
    }

    public Long getActStartTime() {
        return actStartTime;
    }

    public UserAction setActStartTime(Long actStartTime) {
        this.actStartTime = actStartTime;
        return this;
    }

    public Long getActEndTime() {
        return actEndTime;
    }

    public UserAction setActEndTime(Long actEndTime) {
        this.actEndTime = actEndTime;
        return this;
    }

    public String getActType() {
        return actType;
    }

    public UserAction setActType(String actType) {
        this.actType = actType;
        return this;
    }

    public String getDescription() {
        return description;
    }

    public UserAction setDescription(String description) {
        this.description = description;
        return this;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("UserAction{");
        sb.append("id=").append(id);
        sb.append(", openId='").append(openId).append('\'');
        sb.append(", actStartTime='").append(actStartTime).append('\'');
        sb.append(", actEndTime='").append(actEndTime).append('\'');
        sb.append(", actType='").append(actType).append('\'');
        sb.append(", description='").append(description).append('\'');
        sb.append('}');
        return sb.toString();
    }

}
